<!--
 * @Description: 该页面功能已经废弃，此页面内容仅做留存以备查询。-- Taoist
-->
<template>
	<view class="mainPage whitePage" :style="{'padding-top': `${$store.state.safeArea.top || 0}px`, 'padding-bottom': `${$store.state.safeArea.bottom || 0}px`}">
		<public-head :title="title"></public-head>
		<!-- 1 -->
		<view class="box">
			<view class="title">
				<view class="item">
					<text class="shijian">时间</text>
					<text class="xingqi">星期</text>
				</view>
				<view class="item">
					上午
				</view>
				<view class="item">
					下午
				</view>
			</view>
			<view class="time-list">
				<view class="time-item">
					每周一
				</view>
				<view class="time-item" @click="dianji()">
					<text class="chuzhen" v-if="peopleNum!=''&&peopleNum!=0">出诊</text>
					<text v-else>设置</text>
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					每周二
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					每周三
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					每周四
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					每周五
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					每周六
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					每周日
				</view>
				<view class="time-item">
					设置
				</view>
				<view class="time-item">
					设置
				</view>
			</view>
			<view class="btn-box">
				<text class="qingkong">清空</text>
				<text class="quanxuan" @click="quanxuan">全选</text>
			</view>
			<view class="shijianduan">
				<text>!</text>
				上午时间段为8:00-12:00 下午时间段为12:00-17:00
			</view>
		</view>
		<view class="queding-box">
			<view class="queding">确定</view>
		</view>
		<u-popup v-model="show" mode="center" border-radius="16">
			<view class="tanchuceng">
				<view class="top">
					<view class="left">
						设置人数
					</view>
					<view class="right">
						<image @click="guanbi" src="https://swl-1304532176.cos.ap-guangzhou.myqcloud.com/chongesheng_doctor/icon/shanchu1.png" mode=""></image>
					</view>
				</view>
				<view class="bottom">
					<view class="yuyue-box">
						<text>设置可预约人数为</text>
						<input type="number" value="" placeholder-style="color: #768196;" placeholder="0" v-model.trim="peopleNum" />
					</view>
					<view class="quedingjian" @click="quedingjian">
						<text>确定</text>
					</view>
				</view>
			</view>
		</u-popup>
		<u-popup v-model="showAll" mode="center" border-radius="16">
			<view class="tanchuceng-all">
				<view class="time-list">
					<view class="time-item" v-for="i in 7" :key="i">
						<view class="left">
							每周一
						</view>
						<view class="right">
							<view class="shangwu">
								<text>上午</text>
								<input type="number" placeholder="0" placeholder-style="font-size: 28rpx;" value="" />
							</view>
							<view class="xiawu">
								<text>下午</text>
								<input type="number" placeholder="0" placeholder-style="font-size: 28rpx;" value="" />
							</view>
							<image src="https://swl-1304532176.cos.ap-guangzhou.myqcloud.com/chongesheng_doctor/icon/xuanzhong.png" mode=""></image>
						</view>
					</view>
				</view>
				<view class="btn-box">
					<text class="quxiao" @click="quxiao">取消</text>
					<text class="queding">确定</text>
				</view>
			</view>
		</u-popup>
		<!-- 2 -->
	</view>
</template>
<script>
var that
import publicHead from "@/components/publicHead/publicHead.vue"
export default {
	components: {
		publicHead
	},
	data() {
		return {
			title: '接诊设置',
			showAll: false,
			peopleNum: "",  ///预约人数
		}
	},
	onLoad() {
		that = this
	},
	methods: {
		dianji() {
			that.show = true
		},
		guanbi() {
			that.show = false
		},
		quedingjian() {
			if (that.peopleNum == "") {
				uni.showToast({
					icon: "none",
					title: "人数未填写"
				})
				return
			}
			that.show = false
		},
		quanxuan() {
			that.showAll = true
		},
		quxiao() {
			that.showAll = false
		}
	}
}
</script>
<style scoped lang="scss">
.box {
	padding: 30rpx 32rpx 230rpx;
	.title {
		display: flex;
		justify-content: space-between;
		margin-bottom: 12rpx;
		.item {
			width: calc((80% - 24rpx) / 2);
			height: 88rpx;
			background: #ffffff;
			border-radius: 4rpx;
			border: 1rpx solid rgba(0, 0, 0, 0.1);
			font-size: 28rpx;
			font-weight: 500;
			color: #333333;
			line-height: 88rpx;
			text-align: center;
			&:nth-of-type(1) {
				width: 20%;
				position: relative;
				font-size: 26rpx;
				font-weight: 400;
				color: #3b3535;
				overflow: hidden;
				&::before {
					content: "";
					display: block;
					width: 200rpx;
					height: 1rpx;
					position: absolute;
					top: 10rpx;
					left: 0;
					transform: translateY(5rpx) rotate(35deg);
					transform-origin: 15% 0%;
					background-color: rgba(0, 0, 0, 0.1);
				}
				.shijian {
					position: absolute;
					top: 10rpx;
					right: 10rpx;
					font-size: 26rpx;
					font-weight: 400;
					color: #3b3535;
					line-height: 36rpx;
				}
				.xingqi {
					position: absolute;
					bottom: 10rpx;
					left: 10rpx;
					font-size: 26rpx;
					font-weight: 400;
					color: #3b3535;
					line-height: 36rpx;
				}
			}
		}
	}
	.time-list {
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		.time-item {
			margin-bottom: 12rpx;
			width: calc((80% - 24rpx) / 2);
			height: 88rpx;
			background: #ffffff;
			border-radius: 4rpx;
			border: 1rpx solid rgba(0, 0, 0, 0.1);
			font-size: 28rpx;
			font-weight: 400;
			color: #768196;
			line-height: 88rpx;
			text-align: center;
			.chuzhen {
				color: rgba(148, 136, 247, 1);
			}
			&:nth-of-type(3n + 1) {
				width: 20%;
				font-weight: 500;
				color: #3b3535;
			}
		}
	}
	.btn-box {
		text-align: right;
		border-bottom: 2rpx solid rgba(0, 0, 0, 0.08);
		padding-bottom: 18rpx;
		.qingkong {
			background: #d8d8d8;
			border-radius: 4rpx;
			padding: 6rpx 36rpx;
			font-size: 24rpx;
			font-weight: 400;
			color: #ffffff;
			line-height: 34rpx;
		}
		.quanxuan {
			margin: 0 16rpx 0 40rpx;
			background: linear-gradient(223deg, #ff9331 0%, #fe7600 100%);
			border-radius: 4rpx;
			padding: 6rpx 36rpx;
			font-size: 24rpx;
			font-weight: 400;
			color: #ffffff;
			line-height: 34rpx;
		}
	}
	.shijianduan {
		padding-top: 26rpx;
		text-align: center;
		font-size: 26rpx;
		font-weight: 400;
		color: #343434;
		line-height: 36rpx;
		text {
			margin-right: 20rpx;
			font-size: 30rpx;
			color: #ff0000;
		}
	}
}
.queding-box {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 0 32rpx 100rpx;
	.queding {
		text-align: center;
		width: 100%;
		height: 98rpx;
		background: linear-gradient(219deg, #ff9331 0%, #fe7600 100%);
		border-radius: 8rpx;
		font-size: 36rpx;
		font-weight: 400;
		color: #ffffff;
		line-height: 98rpx;
	}
}
.tanchuceng {
	width: 584rpx;
	height: 344rpx;
	background: #ffffff;
	.top {
		padding: 36rpx 32rpx 14rpx;
		border-bottom: 2rpx solid rgba(0, 0, 0, 0.08);
		display: flex;
		justify-content: space-between;
		align-items: center;
		.left {
			font-size: 32rpx;
			font-weight: 500;
			color: #333333;
			line-height: 44rpx;
		}
		.right {
			image {
				display: block;
				width: 38rpx;
				height: 38rpx;
			}
		}
	}
	.bottom {
		.yuyue-box {
			padding: 26rpx 0 42rpx;
			text-align: center;
			text {
				vertical-align: middle;
				font-size: 24rpx;
				font-weight: 400;
				color: #3b3535;
				line-height: 34rpx;
				margin-right: 24rpx;
			}
			input {
				display: inline-block;
				vertical-align: middle;
				width: 174rpx;
				height: 74rpx;
				border: 2rpx solid #f7f4f4;
			}
		}
		.quedingjian {
			text-align: center;
			text {
				display: inline-block;
				width: 200rpx;
				height: 76rpx;
				background: linear-gradient(219deg, #ff9331 0%, #fe7600 100%);
				border-radius: 4rpx;
				font-size: 32rpx;
				font-weight: 500;
				color: #ffffff;
				text-align: center;
				line-height: 76rpx;
			}
		}
	}
}
.tanchuceng-all {
	width: 634rpx;
	background: #ffffff;
	.time-list {
		.time-item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			.left {
				width: 178rpx;
				text-align: center;
				font-size: 28rpx;
				font-weight: 500;
				color: #3b3535;
				line-height: 40rpx;
			}
			.right {
				padding: 28rpx 60rpx 28rpx 28rpx;
				width: 100%;
				border-bottom: 2rpx solid rgba(0, 0, 0, 0.08);
				display: flex;
				justify-content: space-between;
				align-items: center;
				.shangwu,
				.xiawu {
					display: inline-block;
					text {
						font-size: 28rpx;
						font-weight: 400;
						color: #3b3535;
						line-height: 40rpx;
						vertical-align: middle;
						margin-right: 10rpx;
					}
					input {
						display: inline-block;
						vertical-align: middle;
						font-size: 28rpx;
						font-weight: 400;
						color: #3b3535;
						line-height: 40rpx;
						width: 60rpx;
					}
				}
				image {
					display: inline-block;
					width: 34rpx;
					height: 34rpx;
				}
			}
		}
	}
	.btn-box {
		padding: 30rpx 0 40rpx;
		text-align: center;
		.quxiao {
			font-size: 24rpx;
			font-weight: 400;
			color: #ffffff;
			line-height: 34rpx;
			padding: 6rpx 36rpx;
			background: #d8d8d8;
			border-radius: 4rpx;
			margin-right: 82rpx;
		}
		.queding {
			font-size: 24rpx;
			font-weight: 400;
			color: #ffffff;
			line-height: 34rpx;
			padding: 6rpx 36rpx;
			background: linear-gradient(223deg, #ff9331 0%, #fe7600 100%);
			border-radius: 4rpx;
		}
	}
}
</style>
